<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>WaitFastCGIRequest</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">WaitFastCGIRequest()</font></b></p>
<p><b>语法</b></p><blockquote>

Result = <font color="#3A3966"><b>WaitFastCGIRequest</b></font>()</blockquote>

</blockquote>
<b>概要</b><br><blockquote>



Waits for a new incoming request. This command will halt the program execution 
until a new request is available. <a href="initfastcgi.html">InitFastCGI()</a> needs to be called successfully before 
using this command. 

 

</blockquote><p><b>参数</b></p><blockquote>
无.


</blockquote><p><b>返回值</b></p><blockquote>



Returns non-zero if a new request has been processed. 

 

</blockquote><p><b>示例</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">If</font></b> <b><font color="#3A3966">Not</font></b> <font color="#3A3966">InitCGI</font>()
    <b><font color="#3A3966">End</font></b>
  <b><font color="#3A3966">EndIf</font></b>
  
  <b><font color="#3A3966">If</font></b> <b><font color="#3A3966">Not</font></b> <font color="#3A3966">InitFastCGI</font>(5600) <font color="#3A3966">; Create the FastCGI program on port 5600</font>
    <b><font color="#3A3966">End</font></b>
  <b><font color="#3A3966">EndIf</font></b>
  
  <b><font color="#3A3966">While</font></b> <font color="#3A3966">WaitFastCGIRequest</font>()
  
    <b><font color="#3A3966">If</font></b> <font color="#3A3966">ReadCGI</font>()
<font color="#3A3966">      WriteCGIHeader</font>(<font color="#924B72">#PB_CGI_HeaderContentType</font>, "text/html", <font color="#924B72">#PB_CGI_LastHeader</font>) <font color="#3A3966">; Write the headers to inform the browser of the content format</font>
  
<font color="#3A3966">      WriteCGIString</font>("&lt;html&gt;&lt;title&gt;PureBasic - FastCGI&lt;/title&gt;&lt;body&gt;" +
                     "Hello from PureBasic FastCGI !&lt;br&gt;" +
                     "Actual time: &lt;b&gt;"+<font color="#3A3966">FormatDate</font>("%hh:%ii",<font color="#3A3966"> Date</font>()) + "&lt;/b&gt;" +
                     "&lt;/body&gt;&lt;/html&gt;")
    <b><font color="#3A3966">EndIf</font></b>
  <b><font color="#3A3966">Wend</font></b>
</font></pre>

</blockquote><p><b>参阅</b></p><blockquote>

<a href="initcgi.html">InitCGI()</a>, <a href="initfastcgi.html">InitFastCGI()</a>, <a href="finishfastcgirequest.html">FinishFastCGIRequest()</a> 

</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center>&lt;- <a href=readcgi.html>ReadCGI()</a> - <a href="index.html">CGI Index</a> - <a href="writecgidata.html">WriteCGIData()</a> -&gt;<br><br>
</body></html>